
*** Table H.17: Survey outcomes
	
	use "$datadir/survey/cleaned_output_20220314", clear
	
	cd "$outputdir_tab/"	
	
	/***************************************************************************
		Cross-Tabulations
	***************************************************************************/
	
		clear matrix
		eststo reason_adopt: estpost tabstat adoptnp_dmnt_a adoptnp_dmnt_b adoptnp_dmnt_c  ///
		adoptnp_demonetization, by(shopowner) statistics(sum) listwise
		esttab reason_adopt using 09_reason_adopt_epayment_demonetization.csv, ///
			cells("adoptnp_dmnt_a(la(Reason A)) adoptnp_dmnt_b(la(Reason B)) adoptnp_dmnt_c(la(Reason C)) adoptnp_demonetization(la(Any Reason))") ///
			label replace noobs nonumber nomtitle alignment(right)
		
		sleep 500
		mat list r(coefs)
		mat rename r(coefs) newmode
		mat list newmode
	
		// LaTeX
		esttab matrix(newmode, transpose) using Table_H_17.tex, ///
			varlabels(adoptnp_dmnt_a "New cash was hard to find" ///
			adoptnp_dmnt_b "\vtop{\hbox{\strut I learnt from my family or friends/}\hbox{\strut who have already used them}}" ///
			adoptnp_dmnt_c "\vtop{\hbox{\strut Shops where I buy things my customers/}\hbox{\strut started using non-cash payments}}" ///
			adoptnp_demonetization "Any Reason", blist(adoptnp_demonetization "\midrule ")) ///
			collabels("Non-Business Owner" "Small Business Owner" "Total", lhs("Reason for Adoption")) ///
			eqlabels(none) label replace noobs nonumber nomtitle alignment(ccc) booktabs ///
			title(Reasons for Adoption of e-Payment Method Post-Demonetization)			
		
	
	